package com.gsi.webstore.platform.storefront.internal.order;

import com.intershop.beehive.foundation.quantity.Money;
import com.intershop.component.marketing.capi.promotion.calculation.rule.ComputedDiscountItem;
import com.intershop.sellside.appbase.b2c.capi.order.Discount;

public class GSIDiscount extends Discount
{
    private final Money amount;
    private final ComputedDiscountItem cdi;
    public GSIDiscount(final ComputedDiscountItem cdi)
    {
        super(cdi);
        this.cdi = cdi;
        amount = cdi.getMoney();
    }

    public GSIDiscount(final ComputedDiscountItem cdi, final Money money)
    {
        super(cdi);
        this.cdi = cdi;
        amount = money;
    }

    @Override
    public Money getAmount()
    {
        return amount;
    }

    public ComputedDiscountItem getComputedDiscountItem()
    {
        return cdi;
    }
}
